#ifndef CONST_INCLUDED
#define CONST_INCLUDED

#define DISPLAY2DATA TRUE
#define DATA2DISPLAY FALSE

#define NBOOL(x) ( x ? false : true )

#define minmax(a,b,c)		(((b) > (a)) ? (((b) < (c)) ? (b) : (c)) : (a))

enum EORIENTATION {
	eorPortrait,
	eorLandscape,
};

// global offset range
int const MIN_GLOB_OFFSET_X = -50;
int const MAX_GLOB_OFFSET_X = 50;
int const MIN_GLOB_OFFSET_Y = -50;
int const MAX_GLOB_OFFSET_Y = 50;

// K offset range
int const MIN_K_OFFSET_X = -5;
int const MAX_K_OFFSET_X = 5;
int const MIN_K_OFFSET_Y = -5;
int const MAX_K_OFFSET_Y = 5;

// comment out to enable
#define UI_DLG_INC_NO_EDIT
//#define UI_DLG_K_NO_K_BY_COLOR


// PrinterDevMod stuff
// bit positions of UI settings in UISettings member of PRINTERDEVMODE
enum ELAYBITS {
	elMagstripe,
	elSmartChip,
	elChipSide,
	elOutput,
	elPrePrint,
	elBackEnabled,		// only used for UI to disable back sides on K/PO Panel page
	elRotateNeeded_,		// no longer used!!!
	elAreaOrientation,		// flag holding last area orientation: false = portrait, true = landscape - needed for area correction
//	elEncodeOnly,		// only used for UI to disable all options on K/PO Panel page if Encode only is checked
	elBits
};

enum ELAY5BITS {
	el5RotateCard,
	el5SwapFB,
	el5CardOutputEnabled,
	el5FlipLongAxis,		// 0 = short axis, 1 / long axis
	el5SaveMaterial,
	el5Bits
};

enum EUVBITS {
	euvNotUsed,				// Bit 0: UV plane is not used
	euvPageSplit,			// Bit 1: Page split
	euvImageFile,			// Bit 2: External file

// not yet defined!
	euvTextAll,				// Bit 3: All text
	euvTextCol,				// Bit 4: Text - specific color
	euvAreaOffset,			// Bit 5: Image & offset - defined area
	euvMacArea,				// Bit 6: Mac area placement (0 = upper right, 1 = lower left)
	euvBits
};

// forward declaration
class CStateMachine;

// common classes
struct SCOMMONCLASSES {
	CStateMachine *pStateMachine;
};


#endif // CONST_INCLUDED
